package com.zyq.plus.controller;

import java.util.List;
import com.zyq.plus.entity.Users;
import com.zyq.plus.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**前端控制器*/
// localhost:8080/users/userList
@RestController
@RequestMapping("/users")
public class UsersController {

    @Autowired(required = false)
    private UsersService usersService;

    @RequestMapping("/userList")//@ResponseBody
    public List<Users> userList() {
        return usersService.list();
    }

}